import { getToken, setToken } from '@/utils/storage'

export default {
  namespaced: true,
  state: {
    // 页面加载获取token
    token: getToken()
  },

  mutations: {
    setUserToken (state, token) {
      state.token = token
      // 将数据存储到本地
      setToken(token)
    }
  },
  actions: {
  },
  getters: {
  }

}
